﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Entity.Car_Rental.Order>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Details
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <fieldset>
        <legend>订单详细</legend>
        <div class="display-label">
            订单号：</div>
        <div class="display-field">
            <%: Model.OrderID %></div>
        <div class="display-label">
            下单用户：</div>
        <div class="display-field">
            <%: Model.BuyerUserID %></div>
        <div class="display-label">
            订单金额：</div>
        <div class="display-field">
            <%: String.Format("{0:F}", Model.OrderAmount) %></div>
        <div class="display-label">
            商品金额：</div>
        <div class="display-field">
            <%: String.Format("{0:F}", Model.ProductSaleAmount) %></div>
        <div class="display-label">
            运费：</div>
        <div class="display-field">
            <%: String.Format("{0:F}", Model.ShippingAmount) %></div>
        <div class="display-label">
            支付方式：</div>
        <div class="display-field">
            <%: ((Entity.CommonEnums.PayType)Model.PayType).GetDescription() %></div>
        <div class="display-label">
            订单状态：</div>
        <div class="display-field">
            <%:((Entity.CommonEnums.OrderStatus)Model.OrderStatus).GetDescription()%></div>
        <div class="display-label">
            备注：</div>
        <div class="display-field">
            <%: Model.Note %></div>
        <div class="display-label">
            下单日期：</div>
        <div class="display-field">
            <%: String.Format("{0:g}", Model.CreateDate) %></div>
        <div class="display-label">
            最后更新日期：</div>
        <div class="display-field">
            <%: String.Format("{0:g}", Model.UpdateDate) %></div>
    </fieldset>
    <% Model.OrderItem_Extend.ToList().ForEach(item =>
       { %>
    <fieldset>
        <legend>
            <%=item.ProductName%></legend>
        <div class="display-label">
            金额</div>
        <div class="display-field">
            <%: item.SalePrice%></div>
        <div class="display-label">
            数量</div>
        <div class="display-field">
            <%: item.Quantity%></div>
    </fieldset>
    <%}); %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
</asp:Content>
